<?php TPL::output('global/header.tpl.htm'); ?>

<div class="aw-container-wrap">
    <div class="container">
        <div class="row">
            <div class="aw-content-wrap clearfix">
                <div class="col-sm-12 col-md-8 aw-main-content">
                    <div class="aw-mod clearfix">
                        <div class="mod-head table-striped clearfix">
                            <h2>
                                <!--<i class="icon icon-users"></i>-->
                            <ul class="nav nav-tabs">
                                <li><a href="/friend/index/"><?php echo _e('好友');?></a></li>
                                <li><a href="/friend/fans/"><?php echo _e('关注');?></a></li>
                                <li><a href="/friend/follow/"><?php echo _e('被关注');?></a></li>
                                <li class="active"><a><?php echo _e('查找好友');?></a></li>
                            </ul>
                            </h2>
                        </div>
                        <div class="mod-body aw-people-list">
                            <div class="mod-head" style="margin-bottom: 10px;">
                                查找好友: <input name="search-friend" id="search-friend" value=""> <span id="search-friend-btn" class="btn btn-info">查找</span>
                            </div>
                            <div class="common-head"></div>
                            <div id="search-friend-result"></div>

                            <?php echo $this->pagination; ?>
                        </div>
                    </div>
                </div>
                <div class="col-sm-12 col-md-4 aw-side-bar hidden-xs hidden-sm <?php if (!$this->feature_list) { ?>active<?php } ?>">
                    <div class="aw-mod side-nav">
                        <div class="mod-body">
                            <!--<ul>-->
                                <!--<?php if ($this->custom_group) { ?>-->
                                <!--<li><a <?php if (!$_GET['group_id'] AND !$_GET['topic_id']) { ?> class="active"<?php } ?> href="people/"><?php _e('全部'); ?></a></li>-->
                                <!--<?php foreach ($this->custom_group AS $key => $val) { ?>-->
                                <!--<li><a <?php if ($_GET['group_id'] == $val['group_id']) { ?> class="active"<?php } ?> href="people/group_id-<?php echo $val['group_id']; ?>"><?php echo $val['group_name']; ?></a></li>-->
                                <!--<?php } ?>-->
                                <!--<?php } ?>-->
                            <!--</ul>-->
                        </div>
                    </div>

                    <div class="aw-mod side-nav">
                        <div class="mod-body">
                            <ul>
                                <!--<?php if ($this->parent_topics) { ?>-->
                                <!--<?php foreach ($this->parent_topics AS $key => $val) { ?>-->
                                <!--<li>-->
                                    <!--<a href="people/topic_id-<?php echo $val['topic_id']; ?>"<?php if ($_GET['topic_id'] == $val['topic_id']) { ?> class="active"<?php } ?>><?php echo $val['topic_title']; ?></a>-->
                                <!--</li>-->
                                <!--<?php } ?>-->
                                <!--<?php } ?>-->
                            </ul>
                        </div>
                    </div>

                    <!-- <div class="aw-mod people-sort">
                        <div class="mod-body">
                            <input type="text" name="" placeholder="按擅长话题搜索..." class="form-control" />
                            <i class="icon icon-down"></i>
                        </div>
                    </div> -->

                </div>
            </div>
        </div>
    </div>
</div>
<script>
    $(function(){
        $("#search-friend-btn").click(function(){
            data = $("#search-friend").val();
            url = G_BASE_URL + '/friend/ajax/search/?q=' + encodeURIComponent(data) + '&limit=10';
            $.get(url,function(result){
                console.log(result);
                $("#search-friend-result").html(result);
            })
        });
    });
</script>
<?php TPL::output('global/footer.tpl.htm'); ?>
